package com.module02.demo03;

//手机卡类
public class PhoneCard {
    //特征
    private PhoneCardType cardType;//卡类型
    private int cardNum;//卡号
    private String UserName;//用户名
    private int passWord;//密码
    private double accountBalance;//账户余额
    private int callDuration;//通话时长
    private int data;//上网流量

    public PhoneCardType getCardType() {
        return cardType;
    }

    public PhoneCard(PhoneCardType cardType) {
        this.cardType = cardType;
    }

    public int getPassWord() {
        return passWord;
    }

    public void setPassWord(int passWord) {
        this.passWord = passWord;
    }

    public int getCallDuration() {
        return callDuration;
    }

    public void setCallDuration(int callDuration) {
        this.callDuration = callDuration;
    }

    public int getData() {
        return data;
    }

    public void setData(int data) {
        this.data = data;
    }

    public int getCardNum() {
        return cardNum;
    }

    public void setCardNum(int cardNum) {
        this.cardNum = cardNum;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        this.UserName = userName;
    }

    public double getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(double accountBalance) {
        this.accountBalance = accountBalance;
    }

    public void setCardType(PhoneCardType cardType) {
        this.cardType = cardType;
    }

    public PhoneCard(int cardNum, int passWord, double accountBalance) {
        setCardNum(cardNum);
        setPassWord(passWord);
        setAccountBalance(accountBalance);
    }


    //行为 显示卡号、密码、当前余额
    public void cardInfo() {
        System.out.println("卡号：" + getCardNum() + "，密码：" + getPassWord() + "，当前余额：" + getAccountBalance());
    }
}
